-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Holiday observance rules could not be applied #11484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
if self.observance is not None or self.offset is not None: | ||
# NOTE: Arbitrary offset to ensure that any offsets | ||
# or observance rules will get applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, maybe have a private method which find the next/previous one?
@jreback Changes incorporated. Holiday.dates() does return a DatetimeIndex rather than a list, but I'm thinking that's okay. |
|
||
.. ipython:: python | ||
|
||
from pandas.tseries.offsets import CDay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you format the same (i think too much indent)
@rockg looks good. pls rebase / minor edits. ping when green. |
@jreback Green |
BUG: Holiday observance rules could not be applied
thanks! |
Closes #11477
Closes #11533
There were some other bugs here that I added tests for. For example,
holiday.dates
for MLK day was returning all holidays from the holiday start date up to the end date rather than just between the range.